<template>
  <div>
    <h3>order/detail</h3>
    <p>{{time}}</p>
    <p>{{query}}</p>
    <router-link to="/dashboard">
      <el-button>dashboard</el-button>
    </router-link>
  </div>
</template>
<script>
export default {
  meta: {
    keepAlive: false,
    title: '订单详情',
    isMenu: false
  },
  name: 'order-detail',
  data () {
    return {
      time: '',
      query: {}
    }
  },
  created () {
    this.time = (new Date()).toString()
    this.query = Object.assign({}, this.$route.query)
  },
  methods: {
    init (to) {
      this.query = Object.assign({}, to.query)
    }
  },
  beforeRouteUpdate (to, from, next) {
    this.init(to)
    next()
  }
}
</script>
